package org.metasketch.simulator.petri;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.metasketch.simulator.resources.ResourceBase;

public class PetriNetSet {

	List<PetriNet> petriNets = new ArrayList<PetriNet>();

	Map<String, Object> attributes = new HashMap<String, Object>();

	public PetriNet getByInitialIdentifier(String partialKey) {

		for (PetriNet net : petriNets) {
			String identifier = net.getIdentifier();

			if (identifier.startsWith(partialKey))
				return net;
		}

		return null;
	}

	public List<PetriNet> getPetriNets() {
		return petriNets;
	}

	public void setPetriNets(List<PetriNet> petriNets) {
		this.petriNets = petriNets;
	}

	public Map<String, Object> getAttributes() {
		return attributes;
	}

	public void setAttributes(Map<String, Object> attributes) {
		this.attributes = attributes;
	}

}
